package com.tongda.core.enums;

public enum DishesStatusEnum {
	UNSERVE("1","未上菜"),
	SERVED("2","已上菜"),
	UNSERVE_CANCEL("3","未上菜退菜"),
	SERVED_CANCEL("4","已上菜退菜"),
	UNXIADAN("5","已点未下单");
	
	public final static String enumCode = "DishesStatus";
	public final static String enumName = "菜肴状态";
	
	private String code;
	private String desc;
	
	DishesStatusEnum(String code,String desc){
		this.code = code;
		this.desc = desc;
	}

	public static String getDesc(String code) {
		for (DishesStatusEnum status : DishesStatusEnum.values()) {
			if (status.getCode().equalsIgnoreCase(code)) {
				return status.getDesc();
			}
		}
		return "";
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}
	
}
